#define _CRT_SECURE_NO_WARNINGS
#define N 206
#include<stdio.h>
int main()
{
	int a[N] = { 0 }, b[N] = { 0 };
	int n, i = 0, flag = 0, maxn = -2147483647, cnt = 0;
	scanf("%d", &n);
	for(i=0;i<n;i++)
	{
		scanf("%d", &a[i]);
		if (a[i] > maxn) maxn = a[i];
	}
	for (int j = 0; j < n; j++)
	{
		if (a[j] == maxn) cnt++;
	}
	printf("%d,%d", maxn, cnt);
	return 0;
}

